﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Brain;
using Microsoft.Xna.Framework.Input;

namespace Demos
{
    public class DemoScreen : GameScreen
    {
        public DemoScreen()
        {
        }

        public override void Update()
        {
            base.Update();

            if (Engine.Instance.InputManager.IsKeyPress(Keys.Back) ||
                Engine.Instance.InputManager.IsAnyPlayerButtonDown(Buttons.B))
            {
                Engine.Instance.Reset();
                new MainMenuScreen();
            }

            if (Engine.Instance.InputManager.IsKeyPress(Keys.F2) ||
                Engine.Instance.InputManager.IsAnyPlayerButtonPress(Buttons.Y))
            {
                Engine.Instance.StereoscopicManager.StereoMode++;;
                if ((int)Engine.Instance.StereoscopicManager.StereoMode > 1)
                {
                    Engine.Instance.StereoscopicManager.StereoMode = 0;
                }
            }
            if (Engine.Instance.InputManager.IsKeyPress(Keys.F1) ||
                Engine.Instance.InputManager.IsAnyPlayerButtonPress(Buttons.X))
            {
                Engine.Instance.StereoscopicManager.Invert =
                    !Engine.Instance.StereoscopicManager.Invert;
            }
        }
    }
}
